import service from './request'

// 列表数据
export function departmentPage (params, page = 1) {
  return service({
    url: '/admin/department/page/' + page,
    method: 'get',
    params: params
  })
}
// 页数
export function departmentPageCount () {
  return service({
    url: '/admin/department/page/count',
    method: 'get',
  })
}
// 添加
export function departmentadd(data){
  return service({
    url:"/admin/department",
    method:"post",
    data
  })
}
// 获取信息
export function departmenthq(id){
  return service({
    url:"/admin/department/"+id,
    method:"get",
   
  })
}
// 编辑
export function departmentedit(data){
  return service({
    url:"/admin/department/",
    method:"put",
    data:data
  })
}
// 删除

export function departmentPagedelet(id){
    return service({
        url:"/admin/department/"+id,
        method:"delete",
        
    })
}